//
//  SYYiPiGaiTableViewCell.m
//  SanYiTeaching
//
//  Created by 郑浩然 on 2019/4/25.
//  Copyright © 2019年 SanYi. All rights reserved.
//

#import "SYYiPiGaiTableViewCell.h"

@interface SYYiPiGaiTableViewCell ()

@property (weak, nonatomic) IBOutlet UILabel *kaoshiTimeLab;//考试时间
@property (weak, nonatomic) IBOutlet UILabel *tihaoLab;//题号
@property (weak, nonatomic) IBOutlet UILabel *zongfenLab;//总分
@property (weak, nonatomic) IBOutlet UILabel *defenLab;
@property (weak, nonatomic) IBOutlet UIImageView *duicuoImageView;
@property (weak, nonatomic) IBOutlet UILabel *pigaishijianLab;

@end


@implementation SYYiPiGaiTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (void)setLogModel:(SYCorrectLogModel *)logModel {
    
    NSString *imageName = nil;
    if ([logModel.isRight isEqualToString:@"1"]) {//对
        imageName = @"yj_pigai_dui";
    } else if ([logModel.isRight isEqualToString:@"2"]) {//半对
        imageName = @"yj_pigai_bandui";
    } else {
        imageName = @"yj_pigai_cuo";
    }
    self.duicuoImageView.image = [UIImage imageNamed:imageName];
    self.kaoshiTimeLab.text = logModel.paperName;
    self.tihaoLab.text = logModel.questionSerial;
    self.zongfenLab.text = logModel.questionScore;
    self.defenLab.text = logModel.score;
    self.pigaishijianLab.text = logModel.correctDate;
}



@end






























